library ieee;
use ieee.electrical_systems.all;
entity capacitor is
generic(
	cap : real := 1.0e-9);
port(
	terminal p : electrical;
	terminal m : electrical
    );
end entity;

architecture simple of capacitor is
	quantity v across i through p to m;
begin
	i == cap * v'dot;
end architecture simple;